Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

airtable

Package Overview
Dependencies
Maintainers
13
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

airtable

The official Airtable JavaScript library.

  • 0.11.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
200K
increased by7.09%
Maintainers
13
Weekly downloads
 
Created

What is airtable?

The airtable npm package allows you to interact with the Airtable API, enabling you to manage and manipulate data stored in Airtable bases. It provides a simple and intuitive interface for performing CRUD (Create, Read, Update, Delete) operations on Airtable records.

What are airtable's main functionalities?

Initialize Airtable

This code initializes the Airtable client with your API key and base ID, allowing you to interact with a specific Airtable base.

const Airtable = require('airtable');
const base = new Airtable({apiKey: 'YOUR_API_KEY'}).base('YOUR_BASE_ID');

Create a Record

This code creates a new record in the specified table with the given field values.

base('Table Name').create({
  'Field1': 'Value1',
  'Field2': 'Value2'
}, function(err, record) {
  if (err) {
    console.error(err);
    return;
  }
  console.log(record.getId());
});

Read Records

This code retrieves records from the specified table and logs the value of 'Field1' for each record.

base('Table Name').select({
  maxRecords: 3,
  view: 'Grid view'
}).eachPage(function page(records, fetchNextPage) {
  records.forEach(function(record) {
    console.log('Retrieved', record.get('Field1'));
  });
  fetchNextPage();
}, function done(err) {
  if (err) { console.error(err); return; }
});

Update a Record

This code updates a specific record in the table with a new value for 'Field1'.

base('Table Name').update('recXXXXXXXXXXXXXX', {
  'Field1': 'Updated Value'
}, function(err, record) {
  if (err) {
    console.error(err);
    return;
  }
  console.log(record.get('Field1'));
});

Delete a Record

This code deletes a specific record from the table.

base('Table Name').destroy('recXXXXXXXXXXXXXX', function(err, deletedRecord) {
  if (err) {
    console.error(err);
    return;
  }
  console.log('Deleted record', deletedRecord.id);
});

Other packages similar to airtable

Keywords

FAQs

Package last updated on 28 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc